//
//  DishTermialView.m
//  XRmenu
//
//  Created by gaomz on 11-3-28.
//  Copyright 2011 E0571. All rights reserved.
//

#import "DishTermialView.h"
#import "XRmenuPublic.h"

@implementation DishTermialView


-(id)initWithStyle:(NSString *)vname isTheFinished:(BOOL)isTheFinished
{
	NSDictionary* aDic = [self findNode:APPSESSION.allconfig withKey:vname];
	if ((self=[super initWithConfig:aDic])) {
		
		[self add1fingerTap];
		
		UIImageView *photoImage = (UIImageView *)[self viewWithTag:kTagOfStartImgV];
		
		NSString *imgUrl;
		if (isTheFinished) {
			imgUrl= locimg(@"View/Photo View/theLastPage.png");
		}
		else {
			imgUrl= locimg(@"View/Photo View/theFirstPage.png");
		}

		UIImage *img = [UIImage imageWithContentsOfFile:imgUrl];
		[photoImage setImage:img];
		
		
	}
	return self;
}

-(void)handleTapFrom:(UITapGestureRecognizer *)recognizer 
{
	[self removeFromSuperview];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code.
}
*/

- (void)dealloc {
    [super dealloc];
}


@end
